package com.dao;

import com.entity.Praise;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

public interface PraiseDao {
    //通过评论id找到点赞数量
    Integer selectPraiseCountByCommentId(@Param("commentId") Integer commentId);

    //通过用户id和评论id查询点赞对象
    Praise selectPraiseByUidAndCommentId(@Param("uId") Integer uId, @Param("commentId") Integer commentId);

    //插入点赞对象
    int insertPraise(@Param("uId") Integer uId, @Param("commentId") Integer commentId, @Param("create_date") Date createDate);

    //删除点赞对象
    int deletePraise(@Param("uId") Integer uId, @Param("commentId") Integer commentId);
}
